# the compiler: gcc for C program, define as g++ for C++
CC = gcc

# compiler flags:
# -g    adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS  = -g -Wall
CFLAGS2  = -g -Wall -fopenmp
INCLUDES = -I./include

# the build target executable:
TARGET = trabalho2-seq-floyd trabalho2-seq-dijkstra trabalho2-par-floyd trabalho2-par-dijkstra 

all: $(TARGET)

trabalho2-seq-floyd:
	$(CC) $(CFLAGS) -o bin/trabalho2-seq-floyd src/trabalho2-seq-floyd.c

trabalho2-seq-dijkstra: fib-heap ugraph
	$(CC) $(CFLAGS) $(INCLUDES) -o bin/trabalho2-seq-dijkstra src/trabalho2-seq-dijkstra.c lib/fibonacci-heap.o lib/undirected-graph.o 

trabalho2-par-floyd:
	$(CC) $(CFLAGS2) -o bin/trabalho2-par-floyd src/trabalho2-par-floyd.c

trabalho2-par-dijkstra: fib-heap ugraph
	$(CC) $(CFLAGS2) $(INCLUDES) -o bin/trabalho2-par-dijkstra src/trabalho2-par-dijkstra.c lib/fibonacci-heap.o lib/undirected-graph.o 

fib-heap:
	$(CC) $(CFLAGS) $(INCLUDES) -c src/fibonacci-heap.c -o lib/fibonacci-heap.o

ugraph:
	$(CC) $(CFLAGS) $(INCLUDES) -c src/undirected-graph.c -o lib/undirected-graph.o

clean:
	rm bin/* lib/*
